Last updated: 2020-11-23
Checks: 7 0
Knit directory: Supplemenetary_data_files_automation/
This reproducible R Markdown analysis was created with workflowr (version 1.6.2). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.
Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.
Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.
The command set.seed(20201119) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.
Great job! Recording the operating system, R version, and package versions is critical for reproducibility.
Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.
Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.
Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.
The results in this page were generated with repository version dbc184d. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.
Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:
Ignored files:
Ignored: .Rhistory
Ignored: .Rproj.user/
Unstaged changes:
Modified: code/Publishing_script.R
Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.
These are the previous versions of the repository in which changes were made to the R Markdown (analysis/about.Rmd) and HTML (docs/about.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.
| File | Version | Author | Date | Message |
|---|---|---|---|---|
| html | dbc184d | ArmanAttaran | 2020-11-23 | Build site. |
| Rmd | c47d751 | ArmanAttaran | 2020-11-23 | Publish the initial files for myproject |
| html | 476137e | ArmanAttaran | 2020-11-20 | wflow_git_commit(all = TRUE) |
| Rmd | 3cab4d1 | ArmanAttaran | 2020-11-20 | added table of content |
| Rmd | 6694504 | ArmanAttaran | 2020-11-20 | adding the progress from net a |
| Rmd | 4ab77e3 | ArmanAttaran | 2020-11-19 | copied in some stuff from the past attempt |
| html | 0330455 | armanattaran | 2020-11-19 | Build site. |
| html | cb14b5e | ArmanAttaran | 2020-11-19 | Build site. |
| html | a1e5710 | ArmanAttaran | 2020-11-19 | Build site. |
| html | f085ca6 | ArmanAttaran | 2020-11-19 | Build site. |
| html | a3412ef | ArmanAttaran | 2020-11-19 | Build site. |
| Rmd | 943fa43 | ArmanAttaran | 2020-11-19 | Start workflowr project. |
``
this is a base project to simply show creating the supplementary data files and show casing how this simple concept can be used to create maintainable that is easily extendable and has the tools required to manage complexity.
to understand this document browse it as if you would any website; exploring is important and baked into it
anyone can write code a computer can understand; the real challenge is writing in a way that humans can
when a field becomes sufficiently advanced it reinvents algebra; so lets skip straight to algebra
we write software/code to manage complexities; without these tools it would be impossible to do much of all we do; but at the end of the day it is just a tool and picking the right tool for the job is important. when the only tool you have is a hammer everything looks like a nail below I will outline some tools that will help us manage the complexities of working in PGDP; especially remotely.
this document you are reading is a rmarkdown; it is magic as far as I am concerned it combines some powerful yet simple ideas but it ultimately allows you to communicate your purpose; documentation , logic , and code, work report, management tool, training document, research paper, data product, visualization tool, presentation material, panflet and hand out generator, report tool and many other uses in one manageable place; seriously just watch this. it is truly a marvel. more on literate programming here for more info but the jist is this
Literate programming is a programming paradigm introduced by Donald Knuth in which a computer program is given an explanation of its logic in a natural language, such as English, interspersed with snippets of macros and traditional source code, from which compilable source code can be generated.[1] The approach is used in scientific computing and in data science routinely for reproducible research and open access purposes.[2] Literate programming tools are used by millions of programmers today
rmarkdown gives you headings that collapse to further structure this, allowing you to jump between section very quickly
this here is a piece of code using a package called ggplot2; the data is from the world bank and is called gapminder it is a simple data set on life expectancy and gdp per country.
ggplot uses a grammar for describing visual components
library(ggplot2)
data(gapminder, package = "gapminder")
gg <- ggplot(gapminder, aes(gdpPercap, lifeExp, color = continent)) +
geom_point(aes(size = pop, frame = year, ids = country)) +
scale_x_log10()
Warning: Ignoring unknown aesthetics: frame, ids
plotly::ggplotly(gg)
library(ggplot2)
library(tidyverse)
-- Attaching packages --------------------------------------- tidyverse 1.3.0 --
v tibble 3.0.3 v dplyr 1.0.2
v tidyr 1.1.2 v stringr 1.4.0
v readr 1.4.0 v forcats 0.5.0
v purrr 0.3.4
-- Conflicts ------------------------------------------ tidyverse_conflicts() --
x dplyr::filter() masks stats::filter()
x dplyr::lag() masks stats::lag()
pgdp <- cansim::get_cansim( "36-10-0402-02") %>% select(REF_DATE,GEO,Value,VALUE,`North American Industry Classification System (NAICS)`) %>% pivot_wider(names_from = Value, values_from = VALUE)
Accessing CANSIM NDM product 36-10-0402 from Statistics Canada
Parsing data
Folding in metadata
#
gg <- ggplot(pgdp, aes(`Contributions to percent change`, `Current dollars`, color = GEO)) +
geom_point(aes(size = `Chained (2012) dollars`, frame = REF_DATE, ids = `North American Industry Classification System (NAICS)`)) +
scale_x_log10()
Warning: Ignoring unknown aesthetics: frame, ids
plotly::ggplotly(gg)
Warning in self$trans$transform(x): NaNs produced
Warning: Transformation introduced infinite values in continuous x-axis